Go to the source code of this file.
| #define MAX_QMI_PACKET_SIZE (2048 - 6) |
Maximum size in bytes of a QMI packet. This does not include QMUX header. It becomes the maximum SDU of a QMUX packet, MAX_QMUX_PACKET_SIZE - sizeof(QMUX_HDR)
This structure is a wrapper around a mutex and condition object and a buffer. It is a convenience object which may be used to create synchronous QMI APIs.
- Parameters
-
| mutex |
|
| condition |
|
| buffer |
- QMI request packet is written to this buffer. On request completion, contains the QMI response packet.
|
| bufferSize |
- Set to size in bytes of QMI request packet. On request completion, set to size of QMI response packet.
|
- Note
- The buffer is intended for QMI packet only i.e. QMI header and QMI payload. This buffer becomes the SDU of a QMUX packet.
Destroy sync object.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, < 0 on failure.
Initialize sync object.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, < 0 on failure.
Lock sync object.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, < 0 on failure.
| void QmiSyncObject_ResponseCallback |
( |
uint8_t * |
qmiPacket, |
|
|
uint16_t |
qmiPacketSize, |
|
|
void * |
pResponseCallbackContext |
|
) |
| |
This funcion copies QMI response packet to buffer and signals the waiting thread.
- Parameters
-
| [in] | qmiPacket | Received QMI packet. |
| [in] | qmiPacketSize | Received QMI packet size in bytes. |
| [in] | pResponseCallbackContext | Pointer to this sync object. |
Signal sync object. Waiting thread should wake up.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, ETIMEDOUT on timeout, or other negative on failure.
| int QmiSyncObject_TimedWait |
( |
QmiSyncObject * |
pThis, |
|
|
time_t |
timeoutSeconds |
|
) |
| |
Block, waiting on sync object for a number of seconds.
- Parameters
-
| [in] | pThis | The primary object of this call. |
| [in] | timeoutSeconds | Timeout in seconds before abondoning wait. |
- Returns
- 0 on success, < 0 on failure.
Unlock sync object.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, < 0 on failure.
Block, waiting on sync object.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, < 0 on failure.